<?php
namespace app\index\controller;

use app\common\controller\GetAnnounce;
use app\common\controller\Richtext;

class Announce extends Base
{
    /**
     * 获取公告列表
     */
    public function announceList(){
        $info=GetAnnounce::getAnnounce();
        foreach ($info['data'] as &$rows) {
        	$rows['content'] = Richtext::getStirng($rows['content'], 255);
        }
        return jsonSuccess($info);
    }
    /**
     * 获取公告详情
     */
    public function announceDetail(){
        $id=$this->reqeust->post('id');
        $info=GetAnnounce::AnnounceDetail($id);
        return jsonSuccess($info);
    }
}
